#ifndef JDV_HH_
# define JDV_HH_

# include <iostream>
# include <sstream>
# include <fstream>
# include <string>

# include "map.hh"
# include "team.hh"
# include "MyErrors.hh"
# include "my_random.hh"

class Jdv
{
public:
  Jdv ();
  Jdv (std::string);
  Jdv (std::string, std::string);
  ~Jdv ();

  int run ();

private:
  void open ();
  void close ();
  void read_file ();
  void parse_bloc (std::string type, int* nb_team);
  bool parse_bloc_sub (int* posx, int* posy);
  void check ();

  void move ();
  void print ();
private:

  int		total_cycles_;
  int		curr_cycle_;
  std::string	file_;
  std::ifstream	file_in_;
  MyErrors	err_;

  Map*			map_;
  std::vector<Team*>	teams_;
};

#endif /*! JDV_HH_ */

